package pres.liko.iot.user.api;

import io.github.pnoker.common.bean.R;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import pres.liko.iot.user.pojo.Dc3User;
import pres.liko.iot.user.pojo.UserToken;
import reactivefeign.spring.config.ReactiveFeignClient;
import reactor.core.publisher.Mono;

/**
 * @ClassName: UserOpenfeignClient
 * @Auther: liko
 * @Description:
 * @Date: 2022/11/4 14:20
 */
@ReactiveFeignClient("iot-user")
public interface UserOpenfeignClient {

    @PostMapping("/user/info")
    public Mono<R<Object>> addUser(@RequestBody Mono<Dc3User> dc3UserMono);

    @PostMapping("/user/login/{nameOrPhoneOrEmail}/{password}")
    public Mono<R<UserToken>> login(@PathVariable String nameOrPhoneOrEmail, @PathVariable String password);
}
